import React from 'react';
import { Link } from 'react-router-dom';
import { Breadcrumb} from 'antd';
import './breadcrub.less';

export default class BreadCrumb extends React.Component {
	render() {
		return (
			<Breadcrumb>
				{
					this.props.bread.map((item, index) => {
						return (
							<Breadcrumb.Item key={index}>
								{item.link ? <Link to={item.link}>{item.title}</Link> : item.title}
							</Breadcrumb.Item>
						);
					})
				}
			</Breadcrumb>
		);
	}
}
